Customer Support FAQ Assistant - Cameron D#8
Open
CameronDetig wants to merge 22 commits intoautomationExamples:mainfrom
Open
Customer Support FAQ Assistant - Cameron D#8CameronDetig wants to merge 22 commits intoautomationExamples:mainfrom
CameronDetig wants to merge 22 commits intoautomationExamples:mainfrom
Conversation
…t, FAQ corpus data, deterministic mock generation, optional LLM generation, health endpoint, retrieval pipeline, and spec traceability matrix
… specification files for more logical bullet points
… and improve validation criteria
…tomated installation options feat: Update Streamlit UI to improve UX and add chat functionality test: Add integration tests for entrypoint CLI setup help and Streamlit UI DB status handling
feat: Integrate Langchain support for generation and retrieval
…d tox matrix-testing functionality for testing python 3.10, 3.11, and 3.12
…d implement CI workflow with github actions docs: Updating project constitution on guidelines for development
…command docs: enhance README and entrypoint CLI documentation
…rove distilgpt2 output quality checks in generation
…thub.com/CameronDetig/spec-driven-development into feature/customer-faq-assistant-cameron-d
… for better chat responses
…ME for clarity on features and setup instructions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Customer Support FAQ Assistant
Overview
This PR implements a complete spec-driven local RAG (Retrieval-Augmented Generation) assistant for a fictional bank customer support system. The project provides both API and UI interfaces for answering customer questions using local FAQ documents, with no external API dependencies or secrets required.
Core Features
/health,/ask,/db/status, and/db/buildendpointsall-MiniLM-L6-v2embeddingsmock- Deterministic, test-friendly mode (default)flan-t5- Optional local LLM mode using Google's Flan-T5-small (80M params, instruction-tuned)run.pyentrypoint for setup, running services, and testingWorkflow
I started out by talking with ChatGPT to flesh out the project requirements and learn how spec-driven-development works. Here I also brainstormed ideas and asked questions on how this could be implemented and what the stack should look like. I then had ChatGPT generate a document summarizing what we talked about and the plan for the project. This could then be fed directly to Codex 5.3 to start working on the specifications.
I really enjoyed using SDD as it allowed me to build a solid framework on what the project will be before moving into implementation. In my experience with codegen tools, it is more work to try and fix or add features after the model has made a first pass at the code, so this helped to get everything structured from the beginning. Primarily I used Codex 5.3, but would occasionally have Cursor with Opus 4.6 also take a look at the code to see if it could find any improvements. I typically do this in my projects to essentially get another set of eyes on the code to look for things that the LLM possibly missed or to get a different perspective on things.
Once the specs and tests were completed, I moved into implementation. Codex made a great first pass on the code and then it was just a matter of improving and iterating. As I went, if new features were added I had Codex update the specs and keep everything consistent. Also, from reading more about spec-driven-development online, I decided to make a constitution.md file. This contains information on the intent and architecture of the project to keep the codegen tool on track, and make it easier to onboard other codegen tools to the project.
I tried to make everything self contained with no API keys required. This was a challenge, as most LLMs either require an API key, or multi-GB downloads that wouldn't be suitable for this assessment. Initially I tried using the ~300MB distilgpt2 model that was small enough to easily run locally. However, I found out that it is not instruction-tuned, so it often generated nonsensical outputs. Claude Sonnet 4.6 suggested to switch to the Flan-T5 model that is instruction-tuned, which ended up greatly improving the responses from the assistant.
Overall this was an interesting project and I learned a lot about the benefits of spec-driven-development that I will carry into my other work.
Quick Start
Setup
Run Services
Testing
Docker (Optional)
Test Coverage
All 12 feature specs have corresponding test coverage:
health-endpoint.mdtest_health.pyask-endpoint-validation.mdtest_validation.pyask-response-contract.mdtest_contract.pyretrieval-pipeline.mdtest_retrieval.py,test_db.pygeneration-mock.mdtest_determinism.py,test_contract.pygeneration-optional-llm.mdtest_generator_config.pyfaq-data.mdtest_data_loader.pystreamlit-ui.mdtest_streamlit_smoke.py,test_streamlit_ui_logic.pyentrypoint-cli.mdtest_cli.pydocker-optional.mdspec-traceability.mdfeature-template.mdCode Quality
Adherence to Constitution
Testing Standards
Deployment
Local Development
python run.py setup --with-llm python run.py fullstack # Visit http://localhost:8501Docker Production
Dependencies
Core:
fastapi+uvicorn- API frameworkstreamlit- UI frameworkchromadb- Vector databaselangchain+langchain-huggingface+langchain-chroma- RAG orchestrationsentence-transformers- Embedding modelstransformers- LLM inferencepytest+tox- TestingPossible Future Enhancements